\(\int \frac {1+a x}{x^3 \sqrt {a x} \sqrt {1-a x}} \, dx\) [28]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 73 \[ \int \frac {1+a x}{x^3 \sqrt {a x} \sqrt {1-a x}} \, dx=-\frac {2 a^2 \sqrt {1-a x}}{5 (a x)^{5/2}}-\frac {6 a^2 \sqrt {1-a x}}{5 (a x)^{3/2}}-\frac {12 a^2 \sqrt {1-a x}}{5 \sqrt {a x}} \]

[Out]

-2/5*a^2*(-a*x+1)^(1/2)/(a*x)^(5/2)-6/5*a^2*(-a*x+1)^(1/2)/(a*x)^(3/2)-12/5*a^2*(-a*x+1)^(1/2)/(a*x)^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {16, 79, 47, 37} \[ \int \frac {1+a x}{x^3 \sqrt {a x} \sqrt {1-a x}} \, dx=-\frac {12 a^2 \sqrt {1-a x}}{5 \sqrt {a x}}-\frac {6 a^2 \sqrt {1-a x}}{5 (a x)^{3/2}}-\frac {2 a^2 \sqrt {1-a x}}{5 (a x)^{5/2}} \]

[In]

Int[(1 + a*x)/(x^3*Sqrt[a*x]*Sqrt[1 - a*x]),x]

[Out]

(-2*a^2*Sqrt[1 - a*x])/(5*(a*x)^(5/2)) - (6*a^2*Sqrt[1 - a*x])/(5*(a*x)^(3/2)) - (12*a^2*Sqrt[1 - a*x])/(5*Sqr
t[a*x])

Rule 16

Int[(u_.)*(v_)^(m_.)*((b_)*(v_))^(n_), x_Symbol] :> Dist[1/b^m, Int[u*(b*v)^(m + n), x], x] /; FreeQ[{b, n}, x
] && IntegerQ[m]

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n +
1)/((b*c - a*d)*(m + 1))), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 47

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n + 1
)/((b*c - a*d)*(m + 1))), x] - Dist[d*(Simplify[m + n + 2]/((b*c - a*d)*(m + 1))), Int[(a + b*x)^Simplify[m +
1]*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && ILtQ[Simplify[m + n + 2], 0] &&
 NeQ[m, -1] &&  !(LtQ[m, -1] && LtQ[n, -1] && (EqQ[a, 0] || (NeQ[c, 0] && LtQ[m - n, 0] && IntegerQ[n]))) && (
SumSimplerQ[m, 1] ||  !SumSimplerQ[n, 1])

Rule 79

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(-(b*e - a*f
))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1
) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e,
f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || L
tQ[p, n]))))

Rubi steps \begin{align*} \text {integral}& = a^3 \int \frac {1+a x}{(a x)^{7/2} \sqrt {1-a x}} \, dx \\ & = -\frac {2 a^2 \sqrt {1-a x}}{5 (a x)^{5/2}}+\frac {1}{5} \left (9 a^3\right ) \int \frac {1}{(a x)^{5/2} \sqrt {1-a x}} \, dx \\ & = -\frac {2 a^2 \sqrt {1-a x}}{5 (a x)^{5/2}}-\frac {6 a^2 \sqrt {1-a x}}{5 (a x)^{3/2}}+\frac {1}{5} \left (6 a^3\right ) \int \frac {1}{(a x)^{3/2} \sqrt {1-a x}} \, dx \\ & = -\frac {2 a^2 \sqrt {1-a x}}{5 (a x)^{5/2}}-\frac {6 a^2 \sqrt {1-a x}}{5 (a x)^{3/2}}-\frac {12 a^2 \sqrt {1-a x}}{5 \sqrt {a x}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.51 \[ \int \frac {1+a x}{x^3 \sqrt {a x} \sqrt {1-a x}} \, dx=-\frac {2 \sqrt {-a x (-1+a x)} \left (1+3 a x+6 a^2 x^2\right )}{5 a x^3} \]

[In]

Integrate[(1 + a*x)/(x^3*Sqrt[a*x]*Sqrt[1 - a*x]),x]

[Out]

(-2*Sqrt[-(a*x*(-1 + a*x))]*(1 + 3*a*x + 6*a^2*x^2))/(5*a*x^3)

Maple [A] (verified)

Time = 1.51 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.45

method result size
gosper \(-\frac {2 \sqrt {-a x +1}\, \left (6 a^{2} x^{2}+3 a x +1\right )}{5 x^{2} \sqrt {a x}}\) \(33\)
default \(-\frac {2 \sqrt {-a x +1}\, \operatorname {csgn}\left (a \right )^{2} \left (6 a^{2} x^{2}+3 a x +1\right )}{5 x^{2} \sqrt {a x}}\) \(37\)
meijerg \(-\frac {2 a \left (2 a x +1\right ) \sqrt {-a x +1}}{3 \sqrt {a x}\, x}-\frac {2 \left (\frac {8}{3} a^{2} x^{2}+\frac {4}{3} a x +1\right ) \sqrt {-a x +1}}{5 \sqrt {a x}\, x^{2}}\) \(59\)
risch \(\frac {2 \sqrt {a x \left (-a x +1\right )}\, \left (6 a^{3} x^{3}-3 a^{2} x^{2}-2 a x -1\right )}{5 \sqrt {a x}\, \sqrt {-a x +1}\, x^{2} \sqrt {-x \left (a x -1\right ) a}}\) \(63\)

[In]

int((a*x+1)/x^3/(a*x)^(1/2)/(-a*x+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-2/5/x^2/(a*x)^(1/2)*(-a*x+1)^(1/2)*(6*a^2*x^2+3*a*x+1)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.48 \[ \int \frac {1+a x}{x^3 \sqrt {a x} \sqrt {1-a x}} \, dx=-\frac {2 \, {\left (6 \, a^{2} x^{2} + 3 \, a x + 1\right )} \sqrt {a x} \sqrt {-a x + 1}}{5 \, a x^{3}} \]

[In]

integrate((a*x+1)/x^3/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="fricas")

[Out]

-2/5*(6*a^2*x^2 + 3*a*x + 1)*sqrt(a*x)*sqrt(-a*x + 1)/(a*x^3)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 3.56 (sec) , antiderivative size = 189, normalized size of antiderivative = 2.59 \[ \int \frac {1+a x}{x^3 \sqrt {a x} \sqrt {1-a x}} \, dx=a \left (\begin {cases} - \frac {4 a \sqrt {-1 + \frac {1}{a x}}}{3} - \frac {2 \sqrt {-1 + \frac {1}{a x}}}{3 x} & \text {for}\: \frac {1}{\left |{a x}\right |} > 1 \\- \frac {4 i a \sqrt {1 - \frac {1}{a x}}}{3} - \frac {2 i \sqrt {1 - \frac {1}{a x}}}{3 x} & \text {otherwise} \end {cases}\right ) + \begin {cases} - \frac {16 a^{2} \sqrt {-1 + \frac {1}{a x}}}{15} - \frac {8 a \sqrt {-1 + \frac {1}{a x}}}{15 x} - \frac {2 \sqrt {-1 + \frac {1}{a x}}}{5 x^{2}} & \text {for}\: \frac {1}{\left |{a x}\right |} > 1 \\- \frac {16 i a^{2} \sqrt {1 - \frac {1}{a x}}}{15} - \frac {8 i a \sqrt {1 - \frac {1}{a x}}}{15 x} - \frac {2 i \sqrt {1 - \frac {1}{a x}}}{5 x^{2}} & \text {otherwise} \end {cases} \]

[In]

integrate((a*x+1)/x**3/(a*x)**(1/2)/(-a*x+1)**(1/2),x)

[Out]

a*Piecewise((-4*a*sqrt(-1 + 1/(a*x))/3 - 2*sqrt(-1 + 1/(a*x))/(3*x), 1/Abs(a*x) > 1), (-4*I*a*sqrt(1 - 1/(a*x)
)/3 - 2*I*sqrt(1 - 1/(a*x))/(3*x), True)) + Piecewise((-16*a**2*sqrt(-1 + 1/(a*x))/15 - 8*a*sqrt(-1 + 1/(a*x))
/(15*x) - 2*sqrt(-1 + 1/(a*x))/(5*x**2), 1/Abs(a*x) > 1), (-16*I*a**2*sqrt(1 - 1/(a*x))/15 - 8*I*a*sqrt(1 - 1/
(a*x))/(15*x) - 2*I*sqrt(1 - 1/(a*x))/(5*x**2), True))

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.85 \[ \int \frac {1+a x}{x^3 \sqrt {a x} \sqrt {1-a x}} \, dx=-\frac {12 \, \sqrt {-a^{2} x^{2} + a x} a}{5 \, x} - \frac {6 \, \sqrt {-a^{2} x^{2} + a x}}{5 \, x^{2}} - \frac {2 \, \sqrt {-a^{2} x^{2} + a x}}{5 \, a x^{3}} \]

[In]

integrate((a*x+1)/x^3/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="maxima")

[Out]

-12/5*sqrt(-a^2*x^2 + a*x)*a/x - 6/5*sqrt(-a^2*x^2 + a*x)/x^2 - 2/5*sqrt(-a^2*x^2 + a*x)/(a*x^3)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 130 vs. \(2 (55) = 110\).

Time = 0.30 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.78 \[ \int \frac {1+a x}{x^3 \sqrt {a x} \sqrt {1-a x}} \, dx=-\frac {\frac {a^{3} {\left (\sqrt {-a x + 1} - 1\right )}^{5}}{\left (a x\right )^{\frac {5}{2}}} + \frac {15 \, a^{3} {\left (\sqrt {-a x + 1} - 1\right )}^{3}}{\left (a x\right )^{\frac {3}{2}}} + \frac {110 \, a^{3} {\left (\sqrt {-a x + 1} - 1\right )}}{\sqrt {a x}} - \frac {{\left (a^{3} + \frac {15 \, a^{2} {\left (\sqrt {-a x + 1} - 1\right )}^{2}}{x} + \frac {110 \, a {\left (\sqrt {-a x + 1} - 1\right )}^{4}}{x^{2}}\right )} \left (a x\right )^{\frac {5}{2}}}{{\left (\sqrt {-a x + 1} - 1\right )}^{5}}}{80 \, a} \]

[In]

integrate((a*x+1)/x^3/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="giac")

[Out]

-1/80*(a^3*(sqrt(-a*x + 1) - 1)^5/(a*x)^(5/2) + 15*a^3*(sqrt(-a*x + 1) - 1)^3/(a*x)^(3/2) + 110*a^3*(sqrt(-a*x
 + 1) - 1)/sqrt(a*x) - (a^3 + 15*a^2*(sqrt(-a*x + 1) - 1)^2/x + 110*a*(sqrt(-a*x + 1) - 1)^4/x^2)*(a*x)^(5/2)/
(sqrt(-a*x + 1) - 1)^5)/a

Mupad [B] (verification not implemented)

Time = 3.37 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.44 \[ \int \frac {1+a x}{x^3 \sqrt {a x} \sqrt {1-a x}} \, dx=-\frac {\sqrt {1-a\,x}\,\left (\frac {12\,a^2\,x^2}{5}+\frac {6\,a\,x}{5}+\frac {2}{5}\right )}{x^2\,\sqrt {a\,x}} \]

[In]

int((a*x + 1)/(x^3*(a*x)^(1/2)*(1 - a*x)^(1/2)),x)

[Out]

-((1 - a*x)^(1/2)*((6*a*x)/5 + (12*a^2*x^2)/5 + 2/5))/(x^2*(a*x)^(1/2))